#ifndef INPUTCOMBO_H
#define INPUTCOMBO_H

#include <QComboBox>
#include "widget_input.h"

class InputCombo : public QComboBox, public WidgetInput
{
    Q_OBJECT

public:
    InputCombo(QWidget *parent = nullptr, const QString& name = "");

    typedef std::function<void(int)> Callback;

    void setItems(const QStringList& items);
    void setCallback(Callback callback);
    void setType(const QString& type);

    void setValue(const QString& value) override;
    QString getValue() const override;
    bool isEmpty() const override;

private:
    bool _stringType;
};

#endif // INPUTCOMBO_H
